package com.appbee.article.server;

import java.util.List;
import java.util.logging.Logger;

import com.appbee.core.server.dao.BaseDAO;
import com.google.appengine.api.datastore.Query.FilterOperator;

public class ArticleDAO extends BaseDAO<Article>
{
	private static Logger log = Logger.getLogger(ArticleDAO.class.getName());
	
	public Article findByStrId(String strId)
	{
		log.info("Find by strid: "+strId);
		List<Article> list = objectDatastore.find().type(Article.class).addFilter("strId", FilterOperator.EQUAL, strId).returnAll().now();
		return list.size()>0?list.get(0):null;
	}
}
